#ifndef MENU_H
#define MENU_H

#include <QWidget>
#include <QPixmap>
#include <QSettings>
class MainScene;
namespace Ui {
class Menu;
}

class Menu : public QWidget
{
    Q_OBJECT

public:
    explicit Menu(QWidget *parent = nullptr);
    ~Menu();
    void paintEvent(QPaintEvent *event);

    //得分
    int getHighScore(bool isSinglePlayer) const;
        void saveHighScore(bool isSinglePlayer, int score);



signals:
    void startSinglePlayer();
    void startCoopMode();
    void startVersusMode();

private slots:
    void onSinglePlayerClicked();
    void onCoopModeClicked();
    void onVersusModeClicked();

private:

    //得分
    QSettings m_settings;


    Ui::Menu *ui;
    MainScene *gameScene;
private:
    QPixmap m_background;
};

#endif // MENU_H
